#include "mainwindow.h"
#include <QApplication>
#include <QProcess>
#include <QLockFile>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    QLockFile *lockFile = new QLockFile("/tmp/maicss.shutdown.lock");

    if (!lockFile ->tryLock(100)) {
//        lockFile->unlock();
//        QProcess Pro;
//        Pro.start("killall "+me.fileName());
//        Pro.waitForFinished();
        return -1;
    }

    return a.exec();
}
